# from bs4 import BeautifulSoup
# import re

# Soruce = BeautifulSoup(open('V:\大型栏目-年末混剪2022\PyFans\PyLocalfileSort\List\第1页的连接数据.txt', encoding='utf-8'))
# pat = re.compile('(?<=\>).*?(?=\<)')
# result=''.join(pat.findall(Soruce))
import re
import time

for i in range(1, 35):
    with open("V:\大型栏目-年末混剪2022\PyFans\PyLocalfileSort\List\第%d" %i + "页的连接数据.txt", 'r', encoding='utf-8') as strf:
        str = strf.read()
    res = r'(?<=//i).*?(?=jpg@)'
    # fans = r'(?<=<span class="fans-name").*?(?=</span></a>)'
    # res = r'(?<=<li class="list-item clearfix">).*?(?=</div></div></div></li>)'
    li = re.findall(res,str)
    with open("V:\大型栏目-年末混剪2022\PyFans\PyLocalfileSort\FaceList.txt", 'a', encoding='utf-8') as wstr:
        for s in li:
            wstr.write("https://i" + s + "jpg@240w_240h_100Q_1c.jpg")
            wstr.write("\n")
            print(s,' ')
        wstr.close
    time.sleep(0.5)
